#include <stdio.h>

int main()
{
	int num;
	long fract = 1;

	scanf("%d", &num);

	while (num > 1) {
		fract *= num;
		num--;
	}

	printf("%ld\n", fract);

	return 0;
}
